package frsf.cidisi.exercise.idemiatp.search;

import frsf.cidisi.faia.agent.Agent;
import frsf.cidisi.faia.agent.Perception;
import frsf.cidisi.faia.environment.Environment;

public class AgenteArqueologoPerception extends Perception {

	//TODO: Setup Statics
    //public static int UNKNOWN_PERCEPTION = -1;   
	
	
	//TODO: Setup Sensors
	private Tesoro camara;
	private Grafo satelite;
	private String gps;
	
 

    public  AgenteArqueologoPerception() {
    	//TODO: Complete Method
    	camara = new Tesoro();
    	satelite = new Grafo();
    	gps = new String();
    }

    public AgenteArqueologoPerception(Agent agent, Environment environment) {
        super(agent, environment);
    }

    /**
     * This method is used to setup the perception.
     */
    @Override
    public void initPerception(Agent agentIn, Environment environmentIn) {
    	
    	//TODO: Complete Method
        
        AgenteArqueologo agente = (AgenteArqueologo) agentIn;
        AmbienteIsla entorno = (AmbienteIsla) environmentIn;
        StateIsla estadoEntorno = entorno.getEnvironmentState();
       
        gps = estadoEntorno.getPosicionArquelogo();
        camara = estadoEntorno.getTesoro(gps).clone();
        satelite = estadoEntorno.getMapa().clone();
    }
    
    @Override
    public String toString() {
        
    	return "mapa completo  -  "+"camara (valor del tesoro): "+ 
    			camara.getValor()+" Peso: "+camara.getPeso()+
    			" gps: " + gps;
    	
    }

    // The following methods are agent-specific:
    //TODO: Complete this section with the agent-specific methods
	
     public Tesoro getcamara(){
        return camara;
     }
     public void setcamara(Tesoro arg){
        this.camara = arg;
     }
     public Grafo getsatelite(){
        return satelite;
     }
     public void setsatelite(Grafo arg){
        this.satelite = arg;
     }
     public String getgps(){
        return gps;
     }
     public void setgps(String arg){
        this.gps = arg;
     }
	
   
}
